From: Jonas Ã…dahl Date: Wed, 17 Aug 2022 14:25:31 +0000 (+0200) Subject: shell-global: Add MetaContext getter X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~405^2^2~238 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=f171f92522ab6189037151533a8b163296f00a9a;p=gnome-shell.git shell-global: Add MetaContext getter Start to use it instead of using g_object_get(). Part-of: --- diff --git a/src/shell-global.c b/src/shell-global.c index 0ccdb1029..baa28e6d6 100644 --- a/src/shell-global.c +++ b/src/shell-global.c @@ -821,6 +821,17 @@ shell_global_set_stage_input_region (ShellGlobal *global, sync_input_region (global); } +/** + * shell_global_get_context: + * + * Return value: (transfer none): The #MetaContext + */ +MetaContext * +shell_global_get_context (ShellGlobal *global) +{ + return global->meta_context; +} + /** * shell_global_get_stage: * @@ -1269,7 +1280,7 @@ shell_global_reexec_self (ShellGlobal *global) */ pre_exec_close_fds (); - g_object_get (global, "context", &meta_context, NULL); + meta_context = shell_global_get_context (global); meta_context_restore_rlimit_nofile (meta_context, NULL); meta_display_close (shell_global_get_display (global), diff --git a/src/shell-global.h b/src/shell-global.h index 8d8238ca2..87f4e590c 100644 --- a/src/shell-global.h +++ b/src/shell-global.h @@ -15,6 +15,7 @@ G_DECLARE_FINAL_TYPE (ShellGlobal, shell_global, SHELL, GLOBAL, GObject) ShellGlobal *shell_global_get (void); +MetaContext *shell_global_get_context (ShellGlobal *global); ClutterStage *shell_global_get_stage (ShellGlobal *global); MetaDisplay *shell_global_get_display (ShellGlobal *global); GList *shell_global_get_window_actors (ShellGlobal *global);